import utils from '../libs/util'
export default {
    bind () {
    },
    inserted (el, binding, vnode) {
        let {componentInstance, data} = vnode
        let permissions =  componentInstance.$root.$store.state.user.auth.resource[componentInstance.$root.$route.name]
        if (utils.oneOf(data.ref, permissions)) {
            return true
        } else {
            el.remove()
        }
    },
    update () {

    },
    componentUpdated () {

    },
    unbind () {

    }
}